using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class UDF_PKT_LinesMap : EntityTypeConfiguration<UDF_PKT_Lines>
    {
        public UDF_PKT_LinesMap()
        {
            // Primary Key
            this.HasKey(t => t.SPID);

            // Properties
            this.Property(t => t.SPID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.Name1)
                .HasMaxLength(100);

            this.Property(t => t.Value1)
                .HasMaxLength(1000);

            this.Property(t => t.Name2)
                .HasMaxLength(100);

            this.Property(t => t.Value2)
                .HasMaxLength(1000);

            this.Property(t => t.Name3)
                .HasMaxLength(100);

            this.Property(t => t.Value3)
                .HasMaxLength(1000);

            this.Property(t => t.Name4)
                .HasMaxLength(100);

            this.Property(t => t.Value4)
                .HasMaxLength(1000);

            this.Property(t => t.Name5)
                .HasMaxLength(100);

            this.Property(t => t.Value5)
                .HasMaxLength(1000);

            this.Property(t => t.Page)
                .HasMaxLength(100);

            this.Property(t => t.ControlType)
                .HasMaxLength(30);

            this.Property(t => t.Name6)
                .HasMaxLength(100);

            this.Property(t => t.Value6)
                .HasMaxLength(100);

            this.Property(t => t.Name7)
                .HasMaxLength(100);

            this.Property(t => t.Value7)
                .HasMaxLength(100);

            this.Property(t => t.Name8)
                .HasMaxLength(100);

            this.Property(t => t.Value8)
                .HasMaxLength(100);

            this.Property(t => t.Name9)
                .HasMaxLength(100);

            this.Property(t => t.Value9)
                .HasMaxLength(100);

            this.Property(t => t.Name10)
                .HasMaxLength(100);

            this.Property(t => t.Value10)
                .HasMaxLength(100);

            this.Property(t => t.PrintLayout)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("UDF_PKT_Lines");
            this.Property(t => t.SPID).HasColumnName("SPID");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Name1).HasColumnName("Name1");
            this.Property(t => t.Value1).HasColumnName("Value1");
            this.Property(t => t.Name2).HasColumnName("Name2");
            this.Property(t => t.Value2).HasColumnName("Value2");
            this.Property(t => t.Name3).HasColumnName("Name3");
            this.Property(t => t.Value3).HasColumnName("Value3");
            this.Property(t => t.Name4).HasColumnName("Name4");
            this.Property(t => t.Value4).HasColumnName("Value4");
            this.Property(t => t.Name5).HasColumnName("Name5");
            this.Property(t => t.Value5).HasColumnName("Value5");
            this.Property(t => t.Page).HasColumnName("Page");
            this.Property(t => t.CNT).HasColumnName("CNT");
            this.Property(t => t.ControlType).HasColumnName("ControlType");
            this.Property(t => t.Name6).HasColumnName("Name6");
            this.Property(t => t.Value6).HasColumnName("Value6");
            this.Property(t => t.Name7).HasColumnName("Name7");
            this.Property(t => t.Value7).HasColumnName("Value7");
            this.Property(t => t.Name8).HasColumnName("Name8");
            this.Property(t => t.Value8).HasColumnName("Value8");
            this.Property(t => t.Name9).HasColumnName("Name9");
            this.Property(t => t.Value9).HasColumnName("Value9");
            this.Property(t => t.Name10).HasColumnName("Name10");
            this.Property(t => t.Value10).HasColumnName("Value10");
            this.Property(t => t.PrintLayout).HasColumnName("PrintLayout");
        }
    }
}
